#include "ForNode.h"
#include "SentenceBlockNode.h"

void CForNode::DebugPrint(int32_t InDepth)
{
    //print depth
    for (int32_t i = 0; i < InDepth; i++)
    {
        WH::Print(U"\t");
    }

    WH::Print(U"for(");

    if (Init)
    {
        Init->DebugPrint(0);
    }

    WH::Print(U";");

    if (Condition)
    {
        Condition->DebugPrint(0);
    }

    WH::Print(U";");

    if (Step)
    {
        Step->DebugPrint(0);
    }

    WH::Print(U")\n");

    //print depth
    for (int32_t i = 0; i < InDepth; i++)
    {
        WH::Print(U"\t");
    }

    WH::Print(U"{\n");

    Body->DebugPrint(InDepth + 1);

    //print depth
    for (int32_t i = 0; i < InDepth; i++)
    {
        WH::Print(U"\t");
    }

    WH::Print(U"}\n");
}
